<?php
namespace Admin\Controller;
use Think\Controller;

class OmdController extends Controller
{
	public function index()
	{
	 $omd = M()->db(1,"mysqli://root:youphp1998@localhost:3306/omd");
	 $count = $omd->table('omd_grade')->where('omd_id')->count();
	 $page = new \Think\Page($count, 20);
	 $page->setConfig('header','');
	 $page->setConfig('theme','共 %TOTAL_ROW% 个玩家 %FIRST% %UP_PAGE% %LINK_PAGE% %DOWN_PAGE% %END%');
	 $show = $page->show();
	 $list = $omd->table('omd_grade')->where('omd_id>0')->order('omd_id')->limit($page->firstRow.','.$page->listRows)->select();
	 $title = '玩家信息';
	 $this->assign('title', $title);
	 $this->assign('list', $list);
	 $this->assign('page', $show);
	 $this->display();
	}

	public function del()
	{
		$id = I('get.id');
		echo $id;die;
	}
}